<template>
  <div class="bottomComponent">
    <div class="title">底层组件</div>
    <div class="content">data静态接收数据：{{ staticData }}</div>
    <div class="content">computed响应式接收数据：{{ dynamicData }}</div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  inject: ["dynamicProvideData", "staticProvideData"],
  components: {},
  computed: {
    dynamicData() {
      return this.dynamicProvideData();
    },
  },
  data() {
    return {
      staticData: this.staticProvideData,
    };
  },
  methods: {},
});
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.bottomComponent {
  background: $myBlueColor;
  width: 300px;
  height: 200px;
  margin-top: 60px;
  .title {
    color: #000;
    text-align: left;
  }
  .content {
    color: #fff;
  }
}
</style>
